package com.hospital.controller;

import com.hospital.pojo.Users;
import com.hospital.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Create by Administrator on 2018/12/13 20:28
 */

@Controller
@RequestMapping
public class IndexController {

	@Autowired
	private UsersService usersService;

	@RequestMapping
	public String index(Model model){
		List<Users> list = usersService.list();
		model.addAttribute("list", list);
		return "index";
	}

}
